home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
FinderFlocks
/
Shell
/
Shell.h
< prev
next >
Wrap
Text File
|
1996-06-22
|
1KB
|
53 lines
/* Menu ids */
#define APPLE_ID 128
#define FILE_ID 129
#define EDIT_ID 130
/* Junk */
#define WNETRAP 0x60
#define UNIMPTRAP 0x9F
#define RETURN_KEY 13
#define ENTER_KEY 3
#define App4Selector(eventPtr) (*((unsigned char *) &(eventPtr->message)))
#define SR_SELECTOR 0x01
#define RESUME(evtmessage) ((evtmessage) & 0x00000001)
#define SUSPEND(evtmessage) (!RESUME(evtmessage))
/*-------------------------
Types
-------------------------*/
typedef struct
{
MenuHandle mHandle; // the popup menu handle
short mID; // the popup menu ID
// after these two public fields is the mPrivate private data,
// which may be any old size and should not be messed with
}popupPrivateData, *popupPrivateDataPtr, **popupPrivateDataHdl;
/*-------------------------
Prototypes
-------------------------*/
/* init.c */
void initshell(void);
/* events.c */
void DoEvent(EventRecord *Event);
void DoMouse(EventRecord *eventptr);
void DoKey(EventRecord *eventptr);
void DoApp4(EventRecord *eventptr);
void DoMenus(long mstuff);
void DoApple(short id, short item);
void DoFile(short item_no);
void DoEdit(short item_no);
void BailOut(void);
/* utils.c */
Boolean NewPixImage(PixMapHandle ThePix, Rect *TheRect, short dpth);
Boolean NewBitMap(BitMap *TheMap, Rect *TheRect);
void CenterRect(Rect *theRect, Point *thePt);
Point Center(Rect *theRect);
MenuHandle GetPopUpMenuHandle(ControlHandle thisControl);